package com.guiguli.StringJoiner.for_while;

import java.util.Scanner;
//打印输入范围内的质数
public class PrimeNumbers {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int number=sc.nextInt();
        for(int i=0;i<=number;i++){
            int j;
            for(j=2;j<=i;j++){
                if(i%j==0){
                    break;
                }
            }
            if(j==i){
                System.out.println(i);
            }
        }
    }
}
